Next: , Up: Introduction


1.1 Installation

RefTeX is bundled and pre–installed with Emacs since version 20.2. It was also bundled and pre–installed with XEmacs 19.16–20.x. XEmacs 21.x users want to install the corresponding plug-in package which is available from the XEmacs ftp site. See the XEmacs 21.x documentation on package installation for details.

Users of earlier Emacs distributions (including Emacs 19) can get a copy of the RefTeX distribution from the maintainers web-page. See Imprint, for more information.

1.2 Environment

RefTeX needs to access all files which are part of a multifile document, and the BibTeX database files requested by the \bibliography command. To find these files, RefTeX will require a search path, i.e. a list of directories to check. Normally this list is stored in the environment variables TEXINPUTS and BIBINPUTS which are also used by RefTeX. However, on some systems these variables do not contain the full search path. If RefTeX does not work for you because it cannot find some files, read Finding Files.

1.3 Entering RefTeX Mode

To turn RefTeX Mode on and off in a particular buffer, use M-x reftex-mode. To turn on RefTeX Mode for all LaTeX files, add the following lines to your .emacs file:

     (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
     (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode